package cn.xfdzx.android.apps.shop.model;


import java.util.Map;

import cn.xfdzx.android.apps.shop.bean.ConfirmGoodBeen;
import cn.xfdzx.android.apps.shop.bean.MoreGoodsBean;
import cn.xfdzx.android.apps.shop.bean.ShopCarListBeen;
import cn.xfdzx.android.apps.shop.bean.ShopRemakeListMarketBean;
import cn.xfdzx.android.apps.shop.bean.XFDGoodsDetailsBeen;
import cn.xfdzx.android.apps.shop.contract.XFDGoodsDetailsContract;
import cn.xfdzx.android.apps.shop.net.RetrofitClient;
import io.reactivex.Flowable;

/**
 * @author azheng
 * @date 2018/6/4.
 * Description：
 */
public class XFDGoodsDetailsModel implements XFDGoodsDetailsContract.Model {

    @Override
    public Flowable<XFDGoodsDetailsBeen> initData(String good_id) {
        return RetrofitClient.getInstance().getApi().xfdGoodsDetailsData(good_id);
    }

    @Override
    public Flowable<ConfirmGoodBeen> addCar(String is_new, String uniqueId, String productId, String cartNum) {
        return  RetrofitClient.getInstance().getApi().confirmGood(is_new,uniqueId,productId,cartNum);
    }
    @Override
    public Flowable<ShopCarListBeen> shopCarList(String store_id, String index_status) {
        return RetrofitClient.getInstance().getApi().shopCarList(store_id,index_status);
    }

    @Override
    public Flowable<MoreGoodsBean> getStoreGoodsList(Map<String, Object> map) {
        return RetrofitClient.getInstance().getApi().getStoreGoodsList(map);
    }

    @Override
    public Flowable<MoreGoodsBean> getGoodsCollection(Map<String, Object> map) {
        return RetrofitClient.getInstance().getApi().getGoodsCollection(map);
    }

    @Override
    public Flowable<MoreGoodsBean> getGoodsCancleCollection(Map<String, Object> map) {
        return RetrofitClient.getInstance().getApi().getGoodsCancleCollection(map);
    }

    @Override
    public Flowable<ShopRemakeListMarketBean> getShopRemakeMarket(Map<String, Object> map) {
        return RetrofitClient.getInstance().getApi().getShopRemakeMarket(map);
    }
}
